package wei.xinya.core.edu;

import java.util.ArrayList;
import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        Integer[] integers = {1, 2, 3, 4};
        ArrayList<Integer> list = new ArrayList<>(Arrays.asList(integers));

        //lambda expression
        list.removeIf(e -> e == 1);
        list.forEach(System.out::println);
        StringBuffer buffer = new StringBuffer();
        buffer.append("test- ");
        new Thread(() -> System.out.println(buffer.append("1"))).start();
        new Thread(() -> System.out.println(buffer.append("2"))).start();
        new Thread(() -> System.out.println(buffer.append("3"))).start();
        new Thread(() -> System.out.println(buffer.append("4"))).start();
        new Thread(() -> System.out.println(buffer.append("5"))).start();
        new Thread(() -> System.out.println(buffer.append("6"))).start();
        System.out.println(buffer.append("wei"));
    }
}
